<?php

class Users_Profile_DeleteAction extends SrsUsersBaseAction
{
	public function getCredentials()
	{
		return 'users.profile';
	}

	public function executeRead()
	{
		return 'Input';
	}

	public function executeWrite()
	{
		$user = $this->getContext()->getUser();
		/* @var $user SrsUser */

		/* @var $currentUser User */
		$currentUser = $user->getCurrentUser();
		$currentUser->active = false;
		$currentUser->save();
		
		$user->logout();

		return 'Success';
	}
}